POV-Ray : Newsgroups : povray.beta-test : mesh bug : mesh bug Server Time
30 Jul 2024 14:25:44 EDT (-0400)
  mesh bug  
From: Tom Melly
Date: 23 Oct 2001 11:52:02
Message: <3bd59222@news.povray.org>
Windows 95 pov 3.5b6

The following code (which is pretty much the mesh object from the insert
menu) renders fine the first time, but on subsequent renders, there appear
to be co-incident surfaces or similiar. I have to close pov and restart to
get a correct render, but the problem returns on subsequent re-renders.

I've posted first render and second render images to beta binaries just in
case this problem doesn't reproduce on other systems...

#version 3.5;

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <0.0, 0.5, -10.0>
  look_at   <0.0, 0.0,  0.0>
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------

//plane {  y, -1  pigment { color rgb <0.7,0.5,0.3> }}

#declare T1=texture {pigment{Red}}
#declare T2=texture {pigment{Green}}
#declare T3=texture {pigment{Blue}}

mesh { // box example here
  /* top side */
  triangle { <-2,  2, -2>, < 2,  2, -2>, < 2,  2,  2> }
  triangle { <-2,  2, -2>, <-2,  2,  2>, < 2,  2,  2> texture { T1 } }
  /* bottom side */
  triangle { <-2, -2, -2>, < 2, -2, -2>, < 2, -2,  2> }
  triangle { <-2, -2, -2>, <-2, -2,  2>, < 2, -2,  2> }
  /* left side */
  triangle { <-2, -2, -2>, <-2, -2,  2>, <-2,  2,  2> }
  triangle { <-2, -2, -2>, <-2,  2, -2>, <-2,  2,  2> }
  /* right side */
  triangle { < 2, -2, -2>, < 2, -2,  2>, < 2,  2,  2> texture { T2 } }
  triangle { < 2, -2, -2>, < 2,  2, -2>, < 2,  2,  2> texture { T2 } }
  /* front side */
  triangle { <-2, -2, -2>, < 2, -2, -2>, <-2,  2, -2> texture { T3 } }
  triangle { <-2,  2, -2>, < 2,  2, -2>, < 2, -2, -2> texture { T3 } }
  /* back side */
  triangle { <-2, -2,  2>, < 2, -2,  2>, <-2,  2,  2> }
  triangle { <-2,  2,  2>, < 2,  2,  2>, < 2, -2,  2> }
  texture
  { // remaining triangles get this texture
    pigment {Yellow}
    finish { ambient 0.2 diffuse 0.7 }
  }
  rotate y*45
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.